package com.zsl.casuallyheart.main;

import com.zsl.casuallyheart.AppBaseActivity;
import com.zsl.casuallyheart.R;
import com.zsl.casuallyheart.contacts.ContactsActivity;
import com.zsl.casuallyheart.me.MeActivity;
import com.zsl.casuallyheart.message.MessageActivity;

import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabWidget;

/**
 * 主界面类
 * 
 * @author zsl
 * @date 2014-10-5下午5:57:04
 * @version v1.0
 */
public class Main extends TabActivity {
	/**
	 * 控件
	 */
	private TabHost tabHost;
	private TabWidget tabWidget;

	/**
	 * 数据
	 */

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		tabHost = getTabHost();

		tabWidget = tabHost.getTabWidget();
		tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("消息")
				.setContent(new Intent(this, MessageActivity.class)));

		tabHost.addTab(tabHost.newTabSpec("tab2").setIndicator("联系人")
				.setContent(new Intent(this, ContactsActivity.class)));

		tabHost.addTab(tabHost.newTabSpec("tab3").setIndicator("我")
				.setContent(new Intent(this, MeActivity.class)));
		tabHost.setCurrentTab(0);

	}

	/**
	 * 初始化控件
	 */
	private void initView() {

	}

	/**
	 * 初始化数据
	 */
	private void initData() {

	}

}
